<?php $this->headScript()->captureStart()?>
$(function(){

    // 選擇階段
    $("#selectArea #stage").change(function(){
        var id= $(this).val();
        if (id == '') {
          $("#friendlyPrint").addClass('ui-state-disabled');
         return false;
        }
        $("#friendlyPrint").removeClass('ui-state-disabled');

        if ( $("#plusCount").attr('checked') )
        var plusCount = 1;
        else
        var plusCount = 0;

        if ( $("#rateCount").attr('checked') )
        var rateCount = 1;
        else
        var rateCount = 0;

        $.post('<?php echo $this->route('get-score')?>',{
            stage: id,
            plusCount: plusCount,
            rateCount: rateCount
         },
         function(data){
            $("#listScore").html(data);
        });
    });

    $("#plusCount").click(function(){
        $('#selectArea #stage').trigger('change');
    });
    $("#rateCount").click(function(){
        $('#selectArea #stage').trigger('change');
    });

    $("#friendlyPrint").click(function(){
        if ($(this).hasClass('ui-state-disabled'))
        return false;
        var stage = $("#selectArea #stage").val();
       if ( $("#plusCount").attr('checked') )
        var plusCount = 1;
        else
        var plusCount = 0;

        if ( $("#rateCount").attr('checked') )
        var rateCount = 1;
        else
        var rateCount = 0;

        if ( $("#signPrint").attr('checked') )
        var signPrint = 1;
        else
        var signPrint = 0;

       if ( $("#rankPrint").attr('checked') )
        var rankPrint = 1;
        else
        var rankPrint = 0;

        $(this).attr('href','<?php echo $this->route('print-score')?>/stage/'+stage
        +'/plusCount/'+plusCount+'/rateCount/'+rateCount+'/rankPrint/'+rankPrint
        +'/signPrint/'+signPrint
        );

    });


});
<?php $this->headScript()->captureEnd()?>
<style>
.fg-button{font-size:12px;margin:0px  10px;}
</style>

<div id="selectArea">
<form>
<div style="float:left">
<select id="stage">
<option value=""><?php echo $this->translate('select ..')?></option>
<?php for($i=1; $i <= $this->examineSetup->period; $i++):?>
<option value="<?php echo $i?>"><?php echo sprintf($this->translate('%dth stage'),$i)?></option>
<?php endfor;?>
<option value="<?php echo Score_Model_Statistics::WHOLE_STAGE_SCORE?>"><?php echo $this->translate('whole stage score')?></option>
</select>
<input type="checkbox" id="plusCount" value="1"><label for="plusCount"><?php echo $this->translate('usually score counted')?></label>
<input type="checkbox" id="rateCount" value="1"><label for="rateCount"><?php echo $this->translate('rate counted')?></label>
<input type="checkbox" id="rankPrint" value="1"><label for="rankPrint"><?php echo $this->translate('print rank')?></label>
<input type="checkbox" id="signPrint" value="1"><label for="signPrint"><?php echo $this->translate('print sign')?></label>
</div>
<div style="float:left">
<a  id="friendlyPrint" class="fg-button ui-state-default  ui-state-disabled fg-button-icon-left ui-corner-all"  href="#"  target="_blank"><span class="ui-icon ui-icon-print"></span><?php echo $this->translate('Friendly Print')?></a>
</div>
<div style="clear:both"></div>
</form>
</div>
<div id="listScore" >

</div>